<%@ page contentType="text/html; charset=utf-8"%>
<html>
	<head>
		<title>JavaBean作用范围测试</title>
	<head>
	<body>
		<font color=blue>scope3.jsp内容:</font><p>
		已创建4个不同范围的JavaBean对象,并进行请求分派
		<jsp:useBean id="A" scope="page" class="pojo.MyFriend" />
		<jsp:setProperty name="A" property="name" value="小A" />

		<jsp:useBean id="B" scope="request" class="pojo.MyFriend" />
		<jsp:setProperty name="B" property="name" value="小B" />

		<jsp:useBean id="C" scope="session" class="pojo.MyFriend" />
		<jsp:setProperty name="C" property="name" value="小C" />

		<jsp:useBean id="D" scope="application" class="pojo.MyFriend" />
		<jsp:setProperty name="D" property="name" value="小D" />

		<p><p>这四个对象的hash code(16进制)分别是:
		<p>
			A对象:<%=A.toString()%>
		<p>
			B对象:<%=B.toString()%>
		<p>
			C对象:<%=C.toString()%>
		<p>
			D对象:<%=D.toString()%>
		<p>
		<hr>
			<jsp:include page="scope2.jsp" />
	</body>
</html>